package cz.ctu.android.DriveCommunicator.activities;

import cz.ctu.android.DriveCommunicator.R;
import cz.ctu.android.DriveCommunicator.utils.DriverConstants;
import cz.ctu.android.DriveCommunicator.utils.HandlerMessage;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SettingsActivity  extends Activity{
	Button clearStateButton;
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settings);
		clearStateButton = (Button)findViewById(R.id.clearState);
		clearStateButton.setOnClickListener(clearStateClickListener);
	}
	
	private OnClickListener clearStateClickListener = new OnClickListener() {
		
		public void onClick(View v) {
			HandlerMessage hm = new HandlerMessage();
			for(int i=1;i<DriverConstants.numberOfUsers+1;i++){
				hm.deleteConversation(i);
			}			
		}
	};
	
}
